package com.neuedu.corejava.ch2;

import java.util.Scanner;

public class JobTwo {

	public static void main(String[] args) {
		
		Scanner scan = new Scanner(System.in);
        int i = scan.nextInt();
        int x1 = i/1000;
        int x2 = i/100 % 10;
        int x3 = i/10%10;
        int x4 = i % 10;
        int sum = x1 + x2 + x3 + x4;
        System.out.println(sum);     
      
        //3、华氏温度和摄氏温度互相转换，从华氏度变成摄氏度你只要减去32，乘以5再除以9就行了，将摄氏度转成华氏度，直接乘以9，除以5，再加上32即行。[选做题]
		/*float c = 45.0f;
		float f = 113.0f;
		float cTof = (f-32)*9/5;
		float fToc = c*9/5+32;
		System.out.println("摄氏转华氏 = "+cTof);
		System.out.println("华氏转摄氏 = "+fToc);*/
		
        //4、给定一个任意的大写字母A~Z，转换为小写字母。 （知识点：变量和运算符） [选做题]
      /*  char c ='A';
        //加32即小写对于字母
        System.out.println((char) (c + 32));*/
	}

}

